<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script src="./vue.js"></script>
    <script>
      const vm = new Vue({
        data: {
          username: "jack",
        },
        // 自动执行，周期钩子函数
        beforeCreate() {
          console.log("beforeCreate", "开始创建对象", this.username);
        },
        created() {
          console.log("created", "创建对象完成", this.username);
        },
        beforeMount() {
          console.log("beforeMount", "挂载前", this.username);
        },
        mouted() {
          console.log("mouted", "挂载后", this.username);
        },
      });
    </script>
  </body>
</html>
